home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
boe.pres.k12.wv.us
/
boe.pres.k12.wv.us.zip
/
boe.pres.k12.wv.us
/
Utilities
/
Xerox Workcentre 5335
/
Windows Scan
/
32-bit_x86
/
Russian
/
cpsimage.cab
/
data
/
xps
/
xps2xip.elf
< prev
next >
Wrap
Text File
|
2009-03-16
|
1KB
|
47 lines
/*
** First pass at making a script to read XPS and write XPS
**
** Ash Nafarieh 05/15/2006
*/
// Give me a PDF file to convert
#load "xps/xmetWriteXPS.proc"; /* xps support procs */
// let's get what we need to process this
#import "documentio.ucm";
LoadClasses (filename: "xeng");
IMPORT STRING infile;
IMPORT STRING outfile;
// Test for proper parameters
if ( !infile || !outfile) {
print "Usage: \"xipe xps2xip.elf -im infile:s infile outfile:s outfile\" ";
end;
}
// Get a document reader
DOCUMENTREADER dr = CreateDocumentReader (filename: infile);
// Verbose output
INTEGER pgCnt = dr.getPageCount ();
print infile + " has " + pgCnt + " pages";
XIPIMAGE img = dr.getPage(pgnum:1);
print "Segmented image had " + img.nlayers + " layers";
print "WriteXPSOpen";
WriteXPSOpen(filename: outfile);
print "WriteXPSPage";
WriteXPSPage(filename: outfile, img: img, pgNum: 1);
print "WriteXPSClose";
WriteXPSClose(filename: outfile);
// Release resources
dr.release();
print TimeCheck();